local dizai = fk.CreateSkill{
    name = "jinld__dizai",
    tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
    ["jinld__dizai"] = "地载",
    [":jinld__dizai"] = "<a href='heg_formation_skill'>阵法技</a>，与你处于同一<a href='heg_formation'>队列</a>的角色被横置时，取消之。",

    ["$jinld__dizai1"] = "幸得陛下厚任，吾当亡命战场，以报所受。",
    ["$jinld__dizai2"] = "敌虽万众之数，以吾之易为平之。",
}

local H = require "packages/ol_hegemony/util"

dizai:addEffect("arraysummon",{
    array_type = "formation",
})

dizai:addEffect(fk.BeforeChainStateChange,{
    anim_type = "defensive",
    can_trigger = function (self, event, target, player, data)
        return player:hasSkill(dizai.name) and H.inFormationRelation(player, target) and player:hasShownSkill(dizai.name) and not target.chained
    end,
    on_use = function (self, event, target, player, data)
        data.prevented = true
    end,
})

return dizai